home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / MPW Related / MPW Interfaces / CIncludes / Quickdraw.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-17  |  27.9 KB  |  1,027 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Quickdraw.h
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12. #ifndef __QUICKDRAW__
  13. #define __QUICKDRAW__
  14.  
  15. #ifndef __TYPES__
  16. #include <Types.h>
  17. #endif
  18.  
  19. #ifndef __QUICKDRAWTEXT__
  20. #include <QuickdrawText.h>  
  21. #endif
  22.  
  23.  
  24.  
  25. enum {
  26.  
  27.  invalColReq = -1,                    /*invalid color table request*/
  28.  
  29. /* transfer modes */
  30.  srcCopy = 0,                        /*the 16 transfer modes*/
  31.  srcOr = 1,
  32.  srcXor = 2,
  33.  srcBic = 3,
  34.  notSrcCopy = 4,
  35.  notSrcOr = 5,
  36.  notSrcXor = 6,
  37.  notSrcBic = 7,
  38.  patCopy = 8,
  39.  patOr = 9,
  40.  patXor = 10,
  41.  patBic = 11,
  42.  notPatCopy = 12,
  43.  notPatOr = 13,
  44.  notPatXor = 14,
  45.  notPatBic = 15,
  46.  
  47. /* Special Text Transfer Mode */
  48.  grayishTextOr = 49,
  49.  
  50. /* Arithmetic transfer modes */
  51.  blend = 32,
  52.  addPin = 33
  53. };
  54. enum {
  55.  addOver = 34,
  56.  subPin = 35,
  57.  addMax = 37,
  58.  adMax = 37,
  59.  subOver = 38,
  60.  adMin = 39,
  61.  ditherCopy = 64,
  62.  
  63. /* Transparent mode constant */
  64.  transparent = 36,
  65.  
  66. /* QuickDraw color separation constants */
  67.  normalBit = 0,                        /*normal screen mapping*/
  68.  inverseBit = 1,                    /*inverse screen mapping*/
  69.  redBit = 4,                        /*RGB additive mapping*/
  70.  greenBit = 3,
  71.  blueBit = 2,
  72.  cyanBit = 8,                        /*CMYBk subtractive mapping*/
  73.  magentaBit = 7,
  74.  yellowBit = 6,
  75.  blackBit = 5,
  76.  blackColor = 33,                    /*colors expressed in these mappings*/
  77.  whiteColor = 30,
  78.  redColor = 205
  79. };
  80. enum {
  81.  greenColor = 341,
  82.  blueColor = 409,
  83.  cyanColor = 273,
  84.  magentaColor = 137,
  85.  yellowColor = 69,
  86.  
  87.  picLParen = 0,                        /*standard picture comments*/
  88.  picRParen = 1,
  89.  
  90.  
  91.  clutType = 0,                        /*0 if lookup table*/
  92.  fixedType = 1,                        /*1 if fixed table*/
  93.  directType = 2,                    /*2 if direct values*/
  94.  
  95.  gdDevType = 0,                        /*0 = monochrome 1 = color*/
  96.  burstDevice = 7
  97. };
  98. enum {
  99.  hasAuxMenuBar = 6,                    /* 1 if device has an aux menu bar on it */
  100.  ext32Device = 8,
  101.  ramInit = 10,                        /*1 if initialized from 'scrn' resource*/
  102.  mainScreen = 11,                    /* 1 if main screen */
  103.  allInit = 12,                        /* 1 if all devices initialized */
  104.  screenDevice = 13,                    /*1 if screen device [not used]*/
  105.  noDriver = 14,                        /* 1 if no driver for this GDevice */
  106.  screenActive = 15,                    /*1 if in use*/
  107.  
  108.  hiliteBit = 7,                        /*flag bit in HiliteMode (lowMem flag)*/
  109.  pHiliteBit = 0,                    /*flag bit in HiliteMode used with BitClr procedure*/
  110.  
  111.  defQDColors = 127,                    /*resource ID of clut for default QDColors*/
  112.  
  113. /* pixel type */
  114.  RGBDirect = 16,                    /* 16 & 32 bits/pixel pixelType value */
  115.  
  116. /* pmVersion values */
  117.  baseAddr32 = 4,                    /*pixmap base address is 32-bit address*/
  118.  
  119.  rgnOverflowErr = -147,                /* Region accumulation failed. Resulting region may be currupt */
  120.  insufficientStackErr = -149        /* QuickDraw could not complete the operation */
  121. };
  122.  
  123.  
  124.  
  125.  
  126. enum {frame,paint,erase,invert,fill};
  127. typedef unsigned char GrafVerb;
  128.  
  129. enum {chunky,chunkyPlanar,planar};
  130. typedef unsigned char PixelType;
  131.  
  132.  
  133. typedef short Bits16[16];
  134.  
  135. #define dangerousPattern 1  //  This #define is here to support BBS builds temporarily until the 
  136.                             //  sources Can be modified to conform to the new definition.  It *must*
  137.                             //  be Removed when producing a public version of this file <21>
  138.  
  139. /***************   IMPORTANT NOTE REGARDING PATTERN  **************************************
  140.    The old array defintion of Pattern would cause 68000 based CPU's to crash in certain circum-
  141.    stances. The new struct definition is safe, but may require source code changes to compile.
  142.    Read the details in Appendix J of:
  143.            "MPW E.T.O. #6 Latest Libraries/Interfaces"
  144.     If you decide that you are safe, and happier with the old definition, you may add
  145.    "-d dangerousPattern" to your C command line to avoid compilation errors without changing
  146.    your source code.
  147. *********************************************************************************************/
  148. #ifdef dangerousPattern
  149. typedef unsigned char Pattern[8];
  150. typedef Pattern *PatPtr;
  151. typedef const unsigned char *ConstPatternParam;
  152. #else
  153. struct Pattern{
  154.    unsigned char pat[8];
  155. };
  156. typedef struct Pattern Pattern;
  157. typedef Pattern *PatPtr;
  158. typedef const Pattern *ConstPatternParam;
  159. #endif
  160. typedef PatPtr *PatHandle;
  161.  
  162. typedef char QDByte, *QDPtr, **QDHandle;
  163.  
  164. typedef short QDErr;
  165.  
  166. enum {singleDevicesBit = 0, dontMatchSeedsBit = 1, allDevicesBit = 2};
  167. enum {singleDevices = 1 << singleDevicesBit, dontMatchSeeds = 1 << dontMatchSeedsBit,
  168.  allDevices = 1 << allDevicesBit};
  169. typedef unsigned long DeviceLoopFlags;
  170.  
  171.  
  172. struct BitMap {
  173.  Ptr baseAddr;
  174.  short rowBytes;
  175.  Rect bounds;
  176. };
  177.  
  178. typedef struct BitMap BitMap;
  179. typedef BitMap *BitMapPtr, **BitMapHandle;
  180.  
  181. struct Cursor {
  182.  Bits16 data;
  183.  Bits16 mask;
  184.  Point hotSpot;
  185. };
  186.  
  187. typedef struct Cursor Cursor;
  188. typedef Cursor *CursPtr, **CursHandle;
  189.  
  190. struct PenState {
  191.  Point pnLoc;
  192.  Point pnSize;
  193.  short pnMode;
  194.  Pattern pnPat;
  195. };
  196.  
  197. typedef struct PenState PenState;
  198.  
  199. struct Region {
  200.  short rgnSize;                        /*size in bytes*/
  201.  Rect rgnBBox;                        /*enclosing rectangle*/
  202. };
  203.  
  204. typedef struct Region Region;
  205. typedef Region *RgnPtr, **RgnHandle;
  206.  
  207. struct Picture {
  208.  short picSize;
  209.  Rect picFrame;
  210. };
  211.  
  212. typedef struct Picture Picture;
  213. typedef Picture *PicPtr, **PicHandle;
  214.  
  215. struct Polygon {
  216.  short polySize;
  217.  Rect polyBBox;
  218.  Point polyPoints[1];
  219. };
  220.  
  221. typedef struct Polygon Polygon;
  222. typedef Polygon *PolyPtr, **PolyHandle;
  223.  
  224. struct QDProcs {
  225.  Ptr textProc;
  226.  Ptr lineProc;
  227.  Ptr rectProc;
  228.  Ptr rRectProc;
  229.  Ptr ovalProc;
  230.  Ptr arcProc;
  231.  Ptr polyProc;
  232.  Ptr rgnProc;
  233.  Ptr bitsProc;
  234.  Ptr commentProc;
  235.  Ptr txMeasProc;
  236.  Ptr getPicProc;
  237.  Ptr putPicProc;
  238. };
  239.  
  240. typedef struct QDProcs QDProcs;
  241. typedef QDProcs *QDProcsPtr;
  242.  
  243. struct GrafPort {
  244.  short device;
  245.  BitMap portBits;
  246.  Rect portRect;
  247.  RgnHandle visRgn;
  248.  RgnHandle clipRgn;
  249.  Pattern bkPat;
  250.  Pattern fillPat;
  251.  Point pnLoc;
  252.  Point pnSize;
  253.  short pnMode;
  254.  Pattern pnPat;
  255.  short pnVis;
  256.  short txFont;
  257.  Style txFace;                        /*txFace is unpacked byte but push as short*/
  258.  char filler;
  259.  short txMode;
  260.  short txSize;
  261.  Fixed spExtra;
  262.  long fgColor;
  263.  long bkColor;
  264.  short colrBit;
  265.  short patStretch;
  266.  Handle picSave;
  267.  Handle rgnSave;
  268.  Handle polySave;
  269.  QDProcsPtr grafProcs;
  270. };
  271.  
  272. typedef struct GrafPort GrafPort;
  273. typedef GrafPort *GrafPtr;
  274.  
  275.  
  276. typedef GrafPtr WindowPtr;
  277.  
  278. struct RGBColor {
  279.  unsigned short red;                /*magnitude of red component*/
  280.  unsigned short green;                /*magnitude of green component*/
  281.  unsigned short blue;                /*magnitude of blue component*/
  282. };
  283.  
  284. typedef struct RGBColor RGBColor;
  285.  
  286.  
  287. typedef pascal Boolean (*ColorSearchProcPtr)(RGBColor *rgb, long *position);
  288. typedef pascal Boolean (*ColorComplementProcPtr)(RGBColor *rgb);
  289.  
  290. struct ColorSpec {
  291.  short value;                        /*index or other value*/
  292.  RGBColor rgb;                        /*true color*/
  293. };
  294.  
  295. typedef struct ColorSpec ColorSpec;
  296. typedef ColorSpec *ColorSpecPtr;
  297.  
  298.  
  299. typedef ColorSpec CSpecArray[1];
  300.  
  301. struct ColorTable {
  302.  long ctSeed;                        /*unique identifier for table*/
  303.  short ctFlags;                        /*high bit: 0 = PixMap; 1 = device*/
  304.  short ctSize;                        /*number of entries in CTTable*/
  305.  CSpecArray ctTable;                /*array [0..0] of ColorSpec*/
  306. };
  307.  
  308. typedef struct ColorTable ColorTable;
  309. typedef ColorTable *CTabPtr, **CTabHandle;
  310.  
  311. struct MatchRec {
  312.  unsigned short red;
  313.  unsigned short green;
  314.  unsigned short blue;
  315.  long matchData;
  316. };
  317.  
  318. typedef struct MatchRec MatchRec;
  319.  
  320. struct PixMap {
  321.  Ptr baseAddr;                        /*pointer to pixels*/
  322.  short rowBytes;                    /*offset to next line*/
  323.  Rect bounds;                        /*encloses bitmap*/
  324.  short pmVersion;                    /*pixMap version number*/
  325.  short packType;                    /*defines packing format*/
  326.  long packSize;                        /*length of pixel data*/
  327.  Fixed hRes;                        /*horiz. resolution (ppi)*/
  328.  Fixed vRes;                        /*vert. resolution (ppi)*/
  329.  short pixelType;                    /*defines pixel type*/
  330.  short pixelSize;                    /*# bits in pixel*/
  331.  short cmpCount;                    /*# components in pixel*/
  332.  short cmpSize;                        /*# bits per component*/
  333.  long planeBytes;                    /*offset to next plane*/
  334.  CTabHandle pmTable;                /*color map for this pixMap*/
  335.  long pmReserved;                    /*for future use. MUST BE 0*/
  336. };
  337.  
  338. typedef struct PixMap PixMap;
  339. typedef PixMap *PixMapPtr, **PixMapHandle;
  340.  
  341. struct PixPat {
  342.  short patType;                        /*type of pattern*/
  343.  PixMapHandle patMap;                /*the pattern's pixMap*/
  344.  Handle patData;                    /*pixmap's data*/
  345.  Handle patXData;                    /*expanded Pattern data*/
  346.  short patXValid;                    /*flags whether expanded Pattern valid*/
  347.  Handle patXMap;                    /*Handle to expanded Pattern data*/
  348.  Pattern pat1Data;                    /*old-Style pattern/RGB color*/
  349. };
  350.  
  351. typedef struct PixPat PixPat;
  352. typedef PixPat *PixPatPtr, **PixPatHandle;
  353.  
  354. struct CCrsr {
  355.  short crsrType;                    /*type of cursor*/
  356.  PixMapHandle crsrMap;                /*the cursor's pixmap*/
  357.  Handle crsrData;                    /*cursor's data*/
  358.  Handle crsrXData;                    /*expanded cursor data*/
  359.  short crsrXValid;                    /*depth of expanded data (0 if none)*/
  360.  Handle crsrXHandle;                /*future use*/
  361.  Bits16 crsr1Data;                    /*one-bit cursor*/
  362.  Bits16 crsrMask;                    /*cursor's mask*/
  363.  Point crsrHotSpot;                    /*cursor's hotspot*/
  364.  long crsrXTable;                    /*private*/
  365.  long crsrID;                        /*private*/
  366. };
  367.  
  368. typedef struct CCrsr CCrsr;
  369. typedef CCrsr *CCrsrPtr, **CCrsrHandle;
  370.  
  371. struct CIcon {
  372.  PixMap iconPMap;                    /*the icon's pixMap*/
  373.  BitMap iconMask;                    /*the icon's mask*/
  374.  BitMap iconBMap;                    /*the icon's bitMap*/
  375.  Handle iconData;                    /*the icon's data*/
  376.  short iconMaskData[1];                /*icon's mask and BitMap data*/
  377. };
  378.  
  379. typedef struct CIcon CIcon;
  380. typedef CIcon *CIconPtr, **CIconHandle;
  381.  
  382. struct GammaTbl {
  383.  short gVersion;                    /*gamma version number*/
  384.  short gType;                        /*gamma data type*/
  385.  short gFormulaSize;                /*Formula data size*/
  386.  short gChanCnt;                    /*number of channels of data*/
  387.  short gDataCnt;                    /*number of values/channel*/
  388.  short gDataWidth;                    /*bits/corrected value (data packed to next larger byte size)*/
  389.  short gFormulaData[1];                /*data for formulas followed by gamma values*/
  390. };
  391.  
  392. typedef struct GammaTbl GammaTbl;
  393. typedef GammaTbl *GammaTblPtr, **GammaTblHandle;
  394.  
  395. struct ITab {
  396.  long iTabSeed;                        /*copy of CTSeed from source CTable*/
  397.  short iTabRes;                        /*bits/channel resolution of iTable*/
  398.  unsigned char iTTable[1];            /*byte colortable index values*/
  399. };
  400.  
  401. typedef struct ITab ITab;
  402. typedef ITab *ITabPtr, **ITabHandle;
  403.  
  404. struct SProcRec {
  405.  Handle nxtSrch;                    /*SProcHndl Handle to next SProcRec*/
  406.  ColorSearchProcPtr srchProc;        /*pointer to search procedure*/
  407. };
  408.  
  409. typedef struct SProcRec SProcRec;
  410. typedef SProcRec *SProcPtr, **SProcHndl;
  411.  
  412. struct CProcRec {
  413.  Handle nxtComp;                    /*CProcHndl Handle to next CProcRec*/
  414.  ColorComplementProcPtr compProc;    /*pointer to complement procedure*/
  415. };
  416.  
  417. typedef struct CProcRec CProcRec;
  418. typedef CProcRec *CProcPtr, **CProcHndl;
  419.  
  420. struct GDevice {
  421.  short gdRefNum;                    /*driver's unit number*/
  422.  short gdID;                        /*client ID for search procs*/
  423.  short gdType;                        /*fixed/CLUT/direct*/
  424.  ITabHandle gdITable;                /*Handle to inverse lookup table*/
  425.  short gdResPref;                    /*preferred resolution of GDITable*/
  426.  SProcHndl gdSearchProc;            /*search proc list head*/
  427.  CProcHndl gdCompProc;                /*complement proc list*/
  428.  short gdFlags;                        /*grafDevice flags word*/
  429.  PixMapHandle gdPMap;                /*describing pixMap*/
  430.  long gdRefCon;                        /*reference value*/
  431.  Handle gdNextGD;                    /*GDHandle Handle of next gDevice*/
  432.  Rect gdRect;                        /* device's bounds in global coordinates*/
  433.  long gdMode;                        /*device's current mode*/
  434.  short gdCCBytes;                    /*depth of expanded cursor data*/
  435.  short gdCCDepth;                    /*depth of expanded cursor data*/
  436.  Handle gdCCXData;                    /*Handle to cursor's expanded data*/
  437.  Handle gdCCXMask;                    /*Handle to cursor's expanded mask*/
  438.  long gdReserved;                    /*future use. MUST BE 0*/
  439. };
  440.  
  441. typedef struct GDevice GDevice;
  442. typedef GDevice *GDPtr, **GDHandle;
  443.  
  444. struct GrafVars {
  445.  RGBColor rgbOpColor;                /*color for addPin  subPin and average*/
  446.  RGBColor rgbHiliteColor;            /*color for hiliting*/
  447.  Handle pmFgColor;                    /*palette Handle for foreground color*/
  448.  short pmFgIndex;                    /*index value for foreground*/
  449.  Handle pmBkColor;                    /*palette Handle for background color*/
  450.  short pmBkIndex;                    /*index value for background*/
  451.  short pmFlags;                        /*flags for Palette Manager*/
  452. };
  453.  
  454. typedef struct GrafVars GrafVars;
  455. typedef GrafVars *GVarPtr, **GVarHandle;
  456.  
  457. struct CQDProcs {
  458.  Ptr textProc;
  459.  Ptr lineProc;
  460.  Ptr rectProc;
  461.  Ptr rRectProc;
  462.  Ptr ovalProc;
  463.  Ptr arcProc;
  464.  Ptr polyProc;
  465.  Ptr rgnProc;
  466.  Ptr bitsProc;
  467.  Ptr commentProc;
  468.  Ptr txMeasProc;
  469.  Ptr getPicProc;
  470.  Ptr putPicProc;
  471.  Ptr opcodeProc;                    /*fields added to QDProcs*/
  472.  Ptr newProc1;
  473.  Ptr newProc2;
  474.  Ptr newProc3;
  475.  Ptr newProc4;
  476.  Ptr newProc5;
  477.  Ptr newProc6;
  478. };
  479.  
  480. typedef struct CQDProcs CQDProcs;
  481. typedef CQDProcs *CQDProcsPtr;
  482.  
  483. struct CGrafPort {
  484.  short device;
  485.  PixMapHandle portPixMap;            /*port's pixel map*/
  486.  short portVersion;                    /*high 2 bits always set*/
  487.  Handle grafVars;                    /*Handle to more fields*/
  488.  short chExtra;                        /*character extra*/
  489.  short pnLocHFrac;                    /*pen fraction*/
  490.  Rect portRect;
  491.  RgnHandle visRgn;
  492.  RgnHandle clipRgn;
  493.  PixPatHandle bkPixPat;                /*background pattern*/
  494.  RGBColor rgbFgColor;                /*RGB components of fg*/
  495.  RGBColor rgbBkColor;                /*RGB components of bk*/
  496.  Point pnLoc;
  497.  Point pnSize;
  498.  short pnMode;
  499.  PixPatHandle pnPixPat;                /*pen's pattern*/
  500.  PixPatHandle fillPixPat;            /*fill pattern*/
  501.  short pnVis;
  502.  short txFont;
  503.  Style txFace;                        /*txFace is unpacked byte  push as short*/
  504.  char filler;
  505.  short txMode;
  506.  short txSize;
  507.  Fixed spExtra;
  508.  long fgColor;
  509.  long bkColor;
  510.  short colrBit;
  511.  short patStretch;
  512.  Handle picSave;
  513.  Handle rgnSave;
  514.  Handle polySave;
  515.  CQDProcsPtr grafProcs;
  516. };
  517.  
  518. typedef struct CGrafPort CGrafPort;
  519. typedef CGrafPort *CGrafPtr;
  520.  
  521.  
  522. typedef CGrafPtr CWindowPtr;
  523.  
  524. struct ReqListRec {
  525.  short reqLSize;                    /*request list size*/
  526.  short reqLData[1];                    /*request list data*/
  527. };
  528.  
  529. typedef struct ReqListRec ReqListRec;
  530.  
  531. struct OpenCPicParams {
  532.  Rect srcRect;
  533.  Fixed hRes;
  534.  Fixed vRes;
  535.  short version;
  536.  short reserved1;
  537.  long reserved2;
  538. };
  539.  
  540. typedef struct OpenCPicParams OpenCPicParams;
  541.  
  542.  
  543. typedef pascal void (*DeviceLoopDrawingProcPtr)(short depth, short deviceFlags, GDHandle targetDevice,  long userData);
  544.  
  545.  
  546.  
  547.  
  548. extern struct  {
  549. char privates[76];
  550. long randSeed;
  551. BitMap screenBits;
  552. Cursor arrow;
  553. Pattern dkGray;
  554. Pattern ltGray;
  555. Pattern gray;
  556. Pattern black;
  557. Pattern white;
  558. GrafPtr thePort;
  559. }qd;
  560.  
  561.  
  562. #ifdef __cplusplus
  563. extern "C" {
  564. #endif
  565. pascal void InitGraf(void *globalPtr)
  566.  = 0xA86E; 
  567. pascal void OpenPort(GrafPtr port)
  568.  = 0xA86F; 
  569. pascal void InitPort(GrafPtr port)
  570.  = 0xA86D; 
  571. pascal void ClosePort(GrafPtr port)
  572.  = 0xA87D; 
  573. pascal void SetPort(GrafPtr port)
  574.  = 0xA873; 
  575. pascal void GetPort(GrafPtr *port)
  576.  = 0xA874; 
  577. pascal void GrafDevice(short device)
  578.  = 0xA872; 
  579. pascal void SetPortBits(const BitMap *bm)
  580.  = 0xA875; 
  581. pascal void PortSize(short width,short height)
  582.  = 0xA876; 
  583. pascal void MovePortTo(short leftGlobal,short topGlobal)
  584.  = 0xA877; 
  585. pascal void SetOrigin(short h,short v)
  586.  = 0xA878; 
  587. pascal void SetClip(RgnHandle rgn)
  588.  = 0xA879; 
  589. pascal void GetClip(RgnHandle rgn)
  590.  = 0xA87A; 
  591. pascal void ClipRect(const Rect *r)
  592.  = 0xA87B; 
  593. pascal void BackPat(ConstPatternParam pat)
  594.  = 0xA87C; 
  595. pascal void InitCursor(void)
  596.  = 0xA850; 
  597. pascal void SetCursor(const Cursor *crsr)
  598.  = 0xA851; 
  599. pascal void HideCursor(void)
  600.  = 0xA852; 
  601. pascal void ShowCursor(void)
  602.  = 0xA853; 
  603. pascal void ObscureCursor(void)
  604.  = 0xA856; 
  605. pascal void HidePen(void)
  606.  = 0xA896; 
  607. pascal void ShowPen(void)
  608.  = 0xA897; 
  609. pascal void GetPen(Point *pt)
  610.  = 0xA89A; 
  611. pascal void GetPenState(PenState *pnState)
  612.  = 0xA898; 
  613. pascal void SetPenState(const PenState *pnState)
  614.  = 0xA899; 
  615. pascal void PenSize(short width,short height)
  616.  = 0xA89B; 
  617. pascal void PenMode(short mode)
  618.  = 0xA89C; 
  619. pascal void PenPat(ConstPatternParam pat)
  620.  = 0xA89D; 
  621. pascal void PenNormal(void)
  622.  = 0xA89E; 
  623. pascal void MoveTo(short h,short v)
  624.  = 0xA893; 
  625. pascal void Move(short dh,short dv)
  626.  = 0xA894; 
  627. pascal void LineTo(short h,short v)
  628.  = 0xA891; 
  629. pascal void Line(short dh,short dv)
  630.  = 0xA892; 
  631. pascal void ForeColor(long color)
  632.  = 0xA862; 
  633. pascal void BackColor(long color)
  634.  = 0xA863; 
  635. pascal void ColorBit(short whichBit)
  636.  = 0xA864; 
  637. pascal void SetRect(Rect *r,short left,short top,short right,short bottom)
  638.  = 0xA8A7; 
  639. pascal void OffsetRect(Rect *r,short dh,short dv)
  640.  = 0xA8A8; 
  641. pascal void InsetRect(Rect *r,short dh,short dv)
  642.  = 0xA8A9; 
  643. pascal Boolean SectRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  644.  = 0xA8AA; 
  645. pascal void UnionRect(const Rect *src1,const Rect *src2,Rect *dstRect)
  646.  = 0xA8AB; 
  647. pascal Boolean EqualRect(const Rect *rect1,const Rect *rect2)
  648.  = 0xA8A6; 
  649. pascal Boolean EmptyRect(const Rect *r)
  650.  = 0xA8AE; 
  651. pascal void FrameRect(const Rect *r)
  652.  = 0xA8A1; 
  653. pascal void PaintRect(const Rect *r)
  654.  = 0xA8A2; 
  655. pascal void EraseRect(const Rect *r)
  656.  = 0xA8A3; 
  657. pascal void InvertRect(const Rect *r)
  658.  = 0xA8A4; 
  659. pascal void FillRect(const Rect *r,ConstPatternParam pat)
  660.  = 0xA8A5; 
  661. pascal void FrameOval(const Rect *r)
  662.  = 0xA8B7; 
  663. pascal void PaintOval(const Rect *r)
  664.  = 0xA8B8; 
  665. pascal void EraseOval(const Rect *r)
  666.  = 0xA8B9; 
  667. pascal void InvertOval(const Rect *r)
  668.  = 0xA8BA; 
  669. pascal void FillOval(const Rect *r,ConstPatternParam pat)
  670.  = 0xA8BB; 
  671. pascal void FrameRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  672.  = 0xA8B0; 
  673. pascal void PaintRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  674.  = 0xA8B1; 
  675. pascal void EraseRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  676.  = 0xA8B2; 
  677. pascal void InvertRoundRect(const Rect *r,short ovalWidth,short ovalHeight)
  678.  = 0xA8B3; 
  679. pascal void FillRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  680.  ConstPatternParam pat)
  681.  = 0xA8B4; 
  682. pascal void FrameArc(const Rect *r,short startAngle,short arcAngle)
  683.  = 0xA8BE; 
  684. pascal void PaintArc(const Rect *r,short startAngle,short arcAngle)
  685.  = 0xA8BF; 
  686. pascal void EraseArc(const Rect *r,short startAngle,short arcAngle)
  687.  = 0xA8C0; 
  688. pascal void InvertArc(const Rect *r,short startAngle,short arcAngle)
  689.  = 0xA8C1; 
  690. pascal void FillArc(const Rect *r,short startAngle,short arcAngle,ConstPatternParam pat)
  691.  = 0xA8C2; 
  692. pascal RgnHandle NewRgn(void)
  693.  = 0xA8D8; 
  694. pascal void OpenRgn(void)
  695.  = 0xA8DA; 
  696. pascal void CloseRgn(RgnHandle dstRgn)
  697.  = 0xA8DB; 
  698. pascal OSErr BitMapToRegionGlue(RgnHandle region,const BitMap *bMap); 
  699. pascal OSErr BitMapToRegion(RgnHandle region,const BitMap *bMap)
  700.  = 0xA8D7; 
  701. pascal void DisposeRgn(RgnHandle rgn)
  702.  = 0xA8D9; 
  703. pascal void CopyRgn(RgnHandle srcRgn,RgnHandle dstRgn)
  704.  = 0xA8DC; 
  705. pascal void SetEmptyRgn(RgnHandle rgn)
  706.  = 0xA8DD; 
  707. pascal void SetRectRgn(RgnHandle rgn,short left,short top,short right,short bottom)
  708.  = 0xA8DE; 
  709. pascal void RectRgn(RgnHandle rgn,const Rect *r)
  710.  = 0xA8DF; 
  711. pascal void OffsetRgn(RgnHandle rgn,short dh,short dv)
  712.  = 0xA8E0; 
  713. pascal void InsetRgn(RgnHandle rgn,short dh,short dv)
  714.  = 0xA8E1; 
  715. pascal void SectRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  716.  = 0xA8E4; 
  717. pascal void UnionRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  718.  = 0xA8E5; 
  719. pascal void DiffRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  720.  = 0xA8E6; 
  721. pascal void XorRgn(RgnHandle srcRgnA,RgnHandle srcRgnB,RgnHandle dstRgn)
  722.  = 0xA8E7; 
  723. pascal Boolean RectInRgn(const Rect *r,RgnHandle rgn)
  724.  = 0xA8E9; 
  725. pascal Boolean EqualRgn(RgnHandle rgnA,RgnHandle rgnB)
  726.  = 0xA8E3; 
  727. pascal Boolean EmptyRgn(RgnHandle rgn)
  728.  = 0xA8E2; 
  729. pascal void FrameRgn(RgnHandle rgn)
  730.  = 0xA8D2; 
  731. pascal void PaintRgn(RgnHandle rgn)
  732.  = 0xA8D3; 
  733. pascal void EraseRgn(RgnHandle rgn)
  734.  = 0xA8D4; 
  735. pascal void InvertRgn(RgnHandle rgn)
  736.  = 0xA8D5; 
  737. pascal void FillRgn(RgnHandle rgn,ConstPatternParam pat)
  738.  = 0xA8D6; 
  739. pascal void ScrollRect(const Rect *r,short dh,short dv,RgnHandle updateRgn)
  740.  = 0xA8EF; 
  741. pascal void CopyBits(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  742.  const Rect *dstRect,short mode,RgnHandle maskRgn)
  743.  = 0xA8EC; 
  744. pascal void SeedFill(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  745.  short height,short words,short seedH,short seedV)
  746.  = 0xA839; 
  747. pascal void CalcMask(const void *srcPtr,void *dstPtr,short srcRow,short dstRow,
  748.  short height,short words)
  749.  = 0xA838; 
  750. pascal void CopyMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  751.  const Rect *srcRect,const Rect *maskRect,const Rect *dstRect)
  752.  = 0xA817; 
  753. pascal PicHandle OpenPicture(const Rect *picFrame)
  754.  = 0xA8F3; 
  755. pascal void PicComment(short kind,short dataSize,Handle dataHandle)
  756.  = 0xA8F2; 
  757. pascal void ClosePicture(void)
  758.  = 0xA8F4; 
  759. pascal void DrawPicture(PicHandle myPicture,const Rect *dstRect)
  760.  = 0xA8F6; 
  761. pascal void KillPicture(PicHandle myPicture)
  762.  = 0xA8F5; 
  763. pascal PolyHandle OpenPoly(void)
  764.  = 0xA8CB; 
  765. pascal void ClosePoly(void)
  766.  = 0xA8CC; 
  767. pascal void KillPoly(PolyHandle poly)
  768.  = 0xA8CD; 
  769. pascal void OffsetPoly(PolyHandle poly,short dh,short dv)
  770.  = 0xA8CE; 
  771. pascal void FramePoly(PolyHandle poly)
  772.  = 0xA8C6; 
  773. pascal void PaintPoly(PolyHandle poly)
  774.  = 0xA8C7; 
  775. pascal void ErasePoly(PolyHandle poly)
  776.  = 0xA8C8; 
  777. pascal void InvertPoly(PolyHandle poly)
  778.  = 0xA8C9; 
  779. pascal void FillPoly(PolyHandle poly,ConstPatternParam pat)
  780.  = 0xA8CA; 
  781. pascal void SetPt(Point *pt,short h,short v)
  782.  = 0xA880; 
  783. pascal void LocalToGlobal(Point *pt)
  784.  = 0xA870; 
  785. pascal void GlobalToLocal(Point *pt)
  786.  = 0xA871; 
  787. pascal short Random(void)
  788.  = 0xA861; 
  789. pascal void StuffHex(void *thingPtr,ConstStr255Param s)
  790.  = 0xA866; 
  791. pascal Boolean GetPixel(short h,short v)
  792.  = 0xA865; 
  793. pascal void ScalePt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  794.  = 0xA8F8; 
  795. pascal void MapPt(Point *pt,const Rect *srcRect,const Rect *dstRect)
  796.  = 0xA8F9; 
  797. pascal void MapRect(Rect *r,const Rect *srcRect,const Rect *dstRect)
  798.  = 0xA8FA; 
  799. pascal void MapRgn(RgnHandle rgn,const Rect *srcRect,const Rect *dstRect)
  800.  = 0xA8FB; 
  801. pascal void MapPoly(PolyHandle poly,const Rect *srcRect,const Rect *dstRect)
  802.  = 0xA8FC; 
  803. pascal void SetStdProcs(QDProcs *procs)
  804.  = 0xA8EA; 
  805. pascal void StdRect(GrafVerb verb,const Rect *r)
  806.  = 0xA8A0; 
  807. pascal void StdRRect(GrafVerb verb,const Rect *r,short ovalWidth,short ovalHeight)
  808.  = 0xA8AF; 
  809. pascal void StdOval(GrafVerb verb,const Rect *r)
  810.  = 0xA8B6; 
  811. pascal void StdArc(GrafVerb verb,const Rect *r,short startAngle,short arcAngle)
  812.  = 0xA8BD; 
  813. pascal void StdPoly(GrafVerb verb,PolyHandle poly)
  814.  = 0xA8C5; 
  815. pascal void StdRgn(GrafVerb verb,RgnHandle rgn)
  816.  = 0xA8D1; 
  817. pascal void StdBits(const BitMap *srcBits,const Rect *srcRect,const Rect *dstRect,
  818.  short mode,RgnHandle maskRgn)
  819.  = 0xA8EB; 
  820. pascal void StdComment(short kind,short dataSize,Handle dataHandle)
  821.  = 0xA8F1; 
  822. pascal void StdGetPic(void *dataPtr,short byteCount)
  823.  = 0xA8EE; 
  824. pascal void StdPutPic(const void *dataPtr,short byteCount)
  825.  = 0xA8F0; 
  826. pascal void AddPt(Point src,Point *dst)
  827.  = 0xA87E; 
  828. void subpt(Point *src,Point *dst); 
  829. pascal Boolean EqualPt(Point pt1,Point pt2)
  830.  = 0xA881; 
  831. pascal Boolean PtInRect(Point pt,const Rect *r)
  832.  = 0xA8AD; 
  833. pascal void Pt2Rect(Point pt1,Point pt2,Rect *dstRect)
  834.  = 0xA8AC; 
  835. pascal void PtToAngle(const Rect *r,Point pt,short *angle)
  836.  = 0xA8C3; 
  837. pascal Boolean PtInRgn(Point pt,RgnHandle rgn)
  838.  = 0xA8E8; 
  839. pascal void StdLine(Point newPt)
  840.  = 0xA890; 
  841. pascal void OpenCPort(CGrafPtr port)
  842.  = 0xAA00; 
  843. pascal void InitCPort(CGrafPtr port)
  844.  = 0xAA01; 
  845. pascal void CloseCPort(CGrafPtr port)
  846.  = 0xA87D; 
  847. pascal PixMapHandle NewPixMap(void)
  848.  = 0xAA03; 
  849. pascal void DisposPixMap(PixMapHandle pm)
  850.  = 0xAA04; 
  851. pascal void DisposePixMap(PixMapHandle pm)
  852.  = 0xAA04; 
  853. pascal void CopyPixMap(PixMapHandle srcPM,PixMapHandle dstPM)
  854.  = 0xAA05; 
  855. pascal PixPatHandle NewPixPat(void)
  856.  = 0xAA07; 
  857. pascal void DisposPixPat(PixPatHandle pp)
  858.  = 0xAA08; 
  859. pascal void DisposePixPat(PixPatHandle pp)
  860.  = 0xAA08; 
  861. pascal void CopyPixPat(PixPatHandle srcPP,PixPatHandle dstPP)
  862.  = 0xAA09; 
  863. pascal void PenPixPat(PixPatHandle pp)
  864.  = 0xAA0A; 
  865. pascal void BackPixPat(PixPatHandle pp)
  866.  = 0xAA0B; 
  867. pascal PixPatHandle GetPixPat(short patID)
  868.  = 0xAA0C; 
  869. pascal void MakeRGBPat(PixPatHandle pp,const RGBColor *myColor)
  870.  = 0xAA0D; 
  871. pascal void FillCRect(const Rect *r,PixPatHandle pp)
  872.  = 0xAA0E; 
  873. pascal void FillCOval(const Rect *r,PixPatHandle pp)
  874.  = 0xAA0F; 
  875. pascal void FillCRoundRect(const Rect *r,short ovalWidth,short ovalHeight,
  876.  PixPatHandle pp)
  877.  = 0xAA10; 
  878. pascal void FillCArc(const Rect *r,short startAngle,short arcAngle,PixPatHandle pp)
  879.  = 0xAA11; 
  880. pascal void FillCRgn(RgnHandle rgn,PixPatHandle pp)
  881.  = 0xAA12; 
  882. pascal void FillCPoly(PolyHandle poly,PixPatHandle pp)
  883.  = 0xAA13; 
  884. pascal void RGBForeColor(const RGBColor *color)
  885.  = 0xAA14; 
  886. pascal void RGBBackColor(const RGBColor *color)
  887.  = 0xAA15; 
  888. pascal void SetCPixel(short h,short v,const RGBColor *cPix)
  889.  = 0xAA16; 
  890. pascal void SetPortPix(PixMapHandle pm)
  891.  = 0xAA06; 
  892. pascal void GetCPixel(short h,short v,RGBColor *cPix)
  893.  = 0xAA17; 
  894. pascal void GetForeColor(RGBColor *color)
  895.  = 0xAA19; 
  896. pascal void GetBackColor(RGBColor *color)
  897.  = 0xAA1A; 
  898. pascal void SeedCFill(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  899.  const Rect *dstRect,short seedH,short seedV,ColorSearchProcPtr matchProc,
  900.  long matchData)
  901.  = 0xAA50; 
  902. pascal void CalcCMask(const BitMap *srcBits,const BitMap *dstBits,const Rect *srcRect,
  903.  const Rect *dstRect,const RGBColor *seedRGB,ColorSearchProcPtr matchProc,
  904.  long matchData)
  905.  = 0xAA4F; 
  906. pascal PicHandle OpenCPicture(const OpenCPicParams *newHeader)
  907.  = 0xAA20; 
  908. pascal void OpColor(const RGBColor *color)
  909.  = 0xAA21; 
  910. pascal void HiliteColor(const RGBColor *color)
  911.  = 0xAA22; 
  912. pascal void DisposCTable(CTabHandle cTable)
  913.  = 0xAA24; 
  914. pascal void DisposeCTable(CTabHandle cTable)
  915.  = 0xAA24; 
  916. pascal CTabHandle GetCTable(short ctID)
  917.  = 0xAA18; 
  918. pascal CCrsrHandle GetCCursor(short crsrID)
  919.  = 0xAA1B; 
  920. pascal void SetCCursor(CCrsrHandle cCrsr)
  921.  = 0xAA1C; 
  922. pascal void AllocCursor(void)
  923.  = 0xAA1D; 
  924. pascal void DisposCCursor(CCrsrHandle cCrsr)
  925.  = 0xAA26; 
  926. pascal void DisposeCCursor(CCrsrHandle cCrsr)
  927.  = 0xAA26; 
  928. pascal CIconHandle GetCIcon(short iconID)
  929.  = 0xAA1E; 
  930. pascal void PlotCIcon(const Rect *theRect,CIconHandle theIcon)
  931.  = 0xAA1F; 
  932. pascal void DisposCIcon(CIconHandle theIcon)
  933.  = 0xAA25; 
  934. pascal void DisposeCIcon(CIconHandle theIcon)
  935.  = 0xAA25; 
  936. pascal void SetStdCProcs(CQDProcs *procs)
  937.  = 0xAA4E; 
  938. pascal GDHandle GetMaxDevice(const Rect *globalRect)
  939.  = 0xAA27; 
  940. pascal long GetCTSeed(void)
  941.  = 0xAA28; 
  942. pascal GDHandle GetDeviceList(void)
  943.  = 0xAA29; 
  944. pascal GDHandle GetMainDevice(void)
  945.  = 0xAA2A; 
  946. pascal GDHandle GetNextDevice(GDHandle curDevice)
  947.  = 0xAA2B; 
  948. pascal Boolean TestDeviceAttribute(GDHandle gdh,short attribute)
  949.  = 0xAA2C; 
  950. pascal void SetDeviceAttribute(GDHandle gdh,short attribute,Boolean value)
  951.  = 0xAA2D; 
  952. pascal void InitGDevice(short qdRefNum,long mode,GDHandle gdh)
  953.  = 0xAA2E; 
  954. pascal GDHandle NewGDevice(short refNum,long mode)
  955.  = 0xAA2F; 
  956. pascal void DisposGDevice(GDHandle gdh)
  957.  = 0xAA30; 
  958. pascal void DisposeGDevice(GDHandle gdh)
  959.  = 0xAA30; 
  960. pascal void SetGDevice(GDHandle gd)
  961.  = 0xAA31; 
  962. pascal GDHandle GetGDevice(void)
  963.  = 0xAA32; 
  964. pascal long Color2Index(const RGBColor *myColor)
  965.  = 0xAA33; 
  966. pascal void Index2Color(long index,RGBColor *aColor)
  967.  = 0xAA34; 
  968. pascal void InvertColor(RGBColor *myColor)
  969.  = 0xAA35; 
  970. pascal Boolean RealColor(const RGBColor *color)
  971.  = 0xAA36; 
  972. pascal void GetSubTable(CTabHandle myColors,short iTabRes,CTabHandle targetTbl)
  973.  = 0xAA37; 
  974. pascal void MakeITable(CTabHandle cTabH,ITabHandle iTabH,short res)
  975.  = 0xAA39; 
  976. pascal void AddSearch(ColorSearchProcPtr searchProc)
  977.  = 0xAA3A; 
  978. pascal void AddComp(ColorComplementProcPtr compProc)
  979.  = 0xAA3B; 
  980. pascal void DelSearch(ColorSearchProcPtr searchProc)
  981.  = 0xAA4C; 
  982. pascal void DelComp(ColorComplementProcPtr compProc)
  983.  = 0xAA4D; 
  984. pascal void SubPt(Point src,Point *dst)
  985.  = 0xA87F; 
  986. pascal void SetClientID(short id)
  987.  = 0xAA3C; 
  988. pascal void ProtectEntry(short index,Boolean protect)
  989.  = 0xAA3D; 
  990. Boolean equalpt(Point *pt1,Point *pt2); 
  991. pascal void ReserveEntry(short index,Boolean reserve)
  992.  = 0xAA3E; 
  993. pascal void SetEntries(short start,short count,CSpecArray aTable)
  994.  = 0xAA3F; 
  995. Boolean ptinrect(Point *pt,const Rect *r); 
  996. pascal void SaveEntries(CTabHandle srcTable,CTabHandle resultTable,ReqListRec *selection)
  997.  = 0xAA49; 
  998. pascal void RestoreEntries(CTabHandle srcTable,CTabHandle dstTable,ReqListRec *selection)
  999.  = 0xAA4A; 
  1000. void pt2rect(Point *pt1,Point *pt2,const Rect *destRect); 
  1001. pascal short QDError(void)
  1002.  = 0xAA40; 
  1003. pascal void CopyDeepMask(const BitMap *srcBits,const BitMap *maskBits,const BitMap *dstBits,
  1004.  const Rect *srcRect,const Rect *maskRect,const Rect *dstRect,short mode,
  1005.  RgnHandle maskRgn)
  1006.  = 0xAA51; 
  1007. pascal void DeviceLoop(RgnHandle drawingRgn,DeviceLoopDrawingProcPtr drawingProc,
  1008.  long userData,DeviceLoopFlags flags)
  1009.  = 0xABCA; 
  1010. #pragma parameter __A0 GetMaskTable
  1011. pascal Ptr GetMaskTable(void)
  1012.  = 0xA836; 
  1013. void pttoangle(const Rect *r,Point *pt,short *angle); 
  1014. Boolean ptinrgn(Point *pt,RgnHandle rgn); 
  1015. void stdline(Point *newPt); 
  1016. void drawstring(char *s); 
  1017. void addpt(Point *src,Point *dst); 
  1018. void stuffhex(Ptr thingPtr,char *s); 
  1019. short stringwidth(char *s);
  1020.  
  1021.  
  1022. #ifdef __cplusplus
  1023. }
  1024. #endif
  1025.  
  1026. #endif
  1027.